/**
 * 
 */
package com.eagle.coders.core.exceptions;

/**
 * @author Anees
 *
 */
public class RendererException extends BaseAppException {
	
	private boolean isLogged = false;
    private String errorMessageLocation = null; // where to find error message properties file (resource bundle)
    private String messageKey = null; // key to identify which error message in the resource bundle
    private String errorCode = null; // code to identify each types of error
    private String module = null; // code of the module where the error occurs
    private String subModule = null; // code of the sub module where the error occurs
    private Object errorData = null; // the data that causes error
    /*
     * This argument array is used in front-end for displaying proper concatenated
     * message to user, using pattern (retrieved from resource bundle) compatible 
     * with java.text.MessageFormat.
     */
    private Object[] messageArgs = null;

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public RendererException(String msg){
		super(msg);
	}
	
	 public RendererException(String msg, Throwable cause, String errorMessageLocation,
	            String messageKey, String errorCode, String module, String subModule, Object[] msgArgs) {
	        super(msg, cause);
	        this.errorMessageLocation = errorMessageLocation;
	        this.messageKey = messageKey;
	        this.messageArgs = msgArgs;
	        this.errorCode = errorCode;
	        this.module = module;
	        this.subModule = subModule;
	    }

	/**
	 * @return the isLogged
	 */
	public boolean isLogged() {
		return isLogged;
	}

	/**
	 * @return the errorMessageLocation
	 */
	public String getErrorMessageLocation() {
		return errorMessageLocation;
	}

	/**
	 * @return the messageKey
	 */
	public String getMessageKey() {
		return messageKey;
	}

	/**
	 * @return the errorCode
	 */
	public String getErrorCode() {
		return errorCode;
	}

	/**
	 * @return the module
	 */
	public String getModule() {
		return module;
	}

	/**
	 * @return the subModule
	 */
	public String getSubModule() {
		return subModule;
	}

	/**
	 * @return the errorData
	 */
	public Object getErrorData() {
		return errorData;
	}

	/**
	 * @return the messageArgs
	 */
	public Object[] getMessageArgs() {
		return messageArgs;
	}
	 
	 
}
